package re.mapper;

import org.apache.ibatis.annotations.Param;
import re.entity.User;
import re.entity.UserItem;

import java.util.List;

public interface UserMapper {

    User getById(@Param("userId") int id);

    void save(User user);

    void update(User user);

    void delById(@Param("userId") int id);

    void delByName(@Param("userName") String name);

    List<User> getAll();

    List<User> getByField(@Param("userName") String userName, @Param("userAddress") String userAddress);

    UserItem getUserItem(@Param("userId") int id);
}
